Concurrent Separation Logic with Weak Updates
نویسندگان
چکیده
Concurrent Separation Logic (CSL) provides a simple but powerful technique for reasoning about shared-memory concurrent programs. Unfortunately, CSL and separation logic can only support “strong updates,” where mutation to a memory location is safe only if there is a strong memory separation. This severely limits the applicability of CSL since most statically typed languages (e.g., ML, Java, C#) support only “weak updates,” where there is a single global “memory typing” context (which should not be separated) to enforce typepreserving memory updates. In this paper, we attempt to develop a single framework that can support both strong and weak updates. To this end, we present a semantic model of weak updates and then incorporate it into CSL. Our model treats a specification of weakupdate memory as a recursively defined predicate and takes the fixed point of the predicate as the global memory-typing context. We show how this model can be smoothly incorporated into CSL by lifting memory assertions and separating conjunction to parametrize over the memory-typing context. Our extension of CSL is significant since it is the first program logic that can successfully support modular verification of concurrent programs with general ML-style mutable references.
منابع مشابه
Weak updates and separation logic (Technical Report)
Separation Logic (SL) provides a simple but powerful technique for reasoning about imperative programs that use shared data structures. Unfortunately, SL supports only “strong updates”, in which mutation to a heap location is safe only if a unique reference is owned. This limits the applicability of SL when reasoning about the interaction between many high-level languages (e.g., ML, Java, C#) a...
متن کاملProgram Verification Under Weak Memory Consistency Using Separation Logic
The semantics of concurrent programs is now defined by a weak memory model, determined either by the programming language (e.g., in the case of C/C++11 or Java) or by the hardware architecture (e.g., for assembly and legacy C code). Since most work in concurrent software verification has been developed prior to weak memory consistency, it is natural to ask how these models affect formal reasoni...
متن کاملTackling Real-Life Relaxed Concurrency with FSL++
We extend fenced separation logic (FSL), a program logic for reasoning about C11 relaxed access and memory fences. Our extensions to FSL allow us to handle concurrent algorithms appearing in practice. New features added to FSL allow for reasoning about concurrent nonatomic reads, atomic updates, ownership transfer via release sequences, and ghost state. As a demonstration of power of the extend...
متن کاملSL2 Expressive Completeness of Separation Logic With Two Variables and No Separating Conjunction
Separation logic is used as an assertion language for Hoare-style proof systems about programs with pointers, and there is an ongoing quest for understanding its complexity and expressive power. Herein, we show that first-order separation logic with one record field restricted to two variables and the separating implication (no separating conjunction) is as expressive as weak second-order logic...
متن کاملAn Operational Semantics for Concurrent Separation Logic
The deductive veri cation of concurrent programs gained new tools with the advent of Concurrent Separation Logic (CSL). This program logic is a compositional method that combines the Owicki-Gries method with Separation Logic, allowing to reason and prove correct concurrent programs manipulating shared mutable data structure. The soundness of Concurrent Separation Logic had been established usin...
متن کامل